package com.company.jncz.web.actions;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/user")
public class UserController {
	@RequestMapping(value="/createUser")
	public ModelAndView createNewUser(){
		return new ModelAndView("/user/createUser");
	}
	@RequestMapping(value="/getUser/{userId}")
	public String getUser(@PathVariable("userId") String userId){
		System.out.println(userId);
		return "user/userDetail";
	}
	@RequestMapping
	public void index(HttpServletRequest req){
		System.out.println("to index");
		System.out.println(req);
	}
	@RequestMapping
	public void list(HttpServletRequest req){
		System.out.println("to list");
		System.out.println(req);
	}
}
